<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主明细的详情和添加页面（上下结构）</title>
<script type="text/javascript">
</script>
</head>
<body  onresize="resizeGrid();">
	<div id='${m.prefix}_m_maddDiv'>
		<div id='${m.prefix}_m_parentPanel'  title="${m.panelTitle}">
	   		<div id="${m.prefix}_m_top_parentPanel">
				<table cellpadding="0" cellspacing="0" style="width: 100%;padding-top: 3px; ">
					<tr>
						<td>
							<div id="${m.prefix}_totalNum" class="shangXia" style="float: left;visibility:hidden">
								<a style="cursor: pointer;" onclick="upDownPage(this)" sflag="m" pre='${m.prefix}' dsId='${m.dsId}' flag="upPage">上一条</a>|<a style="cursor: pointer;"  sflag="m" onclick="upDownPage(this)" pre='${m.prefix}' dsId='${m.dsId}' flag="downPage">下一条</a> <span id="currentPage"></span>/<span id="lastPage"></span>
							</div>
							<!-- 用于显示的单据的的状态图片 -->
							<div style="float: left; display: none;position:relative;z-index: 2;top:-14px;left:-371px;" id="${m.prefix}_imageShow" >
								<span>
									<!--用于显示审核的图片显示审核人和审核时间-->
									<img src=""  id="showImg" style="display:block;margin-left:420px;position: absolute;"/>
									<span id="status" style="position:absolute;z-index: 2;left: 397px;top:21px;">
										<input id="verDesMan" style="background-color: transparent;border: 0;text-align:center;font-weight: bold;line-height: 10px;font-size: 10px;" readonly="readonly" /><br/>
										<input id="verDesDate" style="background-color: transparent;border: 0;text-align:center;font-weight: bold;line-height: 10px;font-size: 10px;float:left;" readonly="readonly"/> 
									</span>
									
									<!--出入入库的图片显示 --> 
									<img src=""  id="rkImg" style="display:block;margin-left:497px;position: absolute;"/>
									<span id="rkstatus" style="position:absolute;z-index: 2;left: 475px;top:22px;">
										<input id="rkMan" style="background-color: transparent;border: 0;text-align:center;font-weight: bold;color:#00900;line-height: 10px;font-size: 10px;" readonly="readonly" /><br/>
										<input id="rkDate" style="background-color: transparent;border: 0;text-align:center;font-weight: bold;color:#00900;line-height: 10px;font-size: 10px;float: left;" readonly="readonly"/> 
									</span>
								</span>
							</div>
						</td>
						<td align="right">
							<div style="vertical-align: top;margin-right: 15px;" align="right" id="${m.prefix}_M_UBUTN">
								<!-- 生成公用的按钮 -->
								<c:forEach items="${m.butnList}" var="butp">
									<!-- 分组的权限的按钮 -->
									<c:if test="${not empty butp.IS_GROUP && butp.IS_GROUP =='T' && not empty butp.GROUP_ID}">
										<a href="javascript:void(0)" id="mb2"  isbutn="true" code='${m.prefix}_${butp.BUT_CODE}'  iconCls="${butp.iconCls}" plain="false"  menu="#${butp.GROUP_ID}" class="easyui-menubutton" >${butp.BUTN_NAME}</a>
											<div id="${butp.GROUP_ID}" style="width: 150px;">
												<c:forEach items="${m.butnList}" var="butnp">
													<c:if test="${butnp.IS_GROUP != 'T' && not empty butnp.GROUP_ID && butnp.GROUP_ID==butp.GROUP_ID}">
														<c:if test="${empty butnp.SCRIPT_FUNC}">
												   			<div isbutn="true" code='${m.prefix}_${butnp.BUT_CODE}' iconCls="${butnp.iconCls}"  pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='2'  oflag="1" sflag="m" right='${butnp.BUT_RIGHT}'>${butnp.BUTN_NAME}</div> 
												   		</c:if>
												   		<c:if test="${not empty butnp.SCRIPT_FUNC}">
													   		<div  isbutn="true" onclick="${butnp.SCRIPT_FUNC}"  iconCls="${butnp.iconCls}" code='${m.prefix}_${butnp.BUT_CODE}'  pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='2'  oflag="1" sflag="m"  right='${butnp.BUT_RIGHT}'>${butnp.BUTN_NAME}</div>  
												   		</c:if>
													</c:if>
												</c:forEach>
											</div>
									</c:if>
									<!-- 非分组公用按钮 -->
									<c:if test="${empty butp.IS_GROUP &&  empty butp.GROUP_ID}">
										<c:if test="${empty butp.SCRIPT_FUNC}">
											<a class='easyui-linkbutton'  isbutn="true"  id="${m.prefix}_${butp.BUT_CODE}" iconCls="${butp.iconCls}"  code='${m.prefix}_${butp.BUT_CODE}'  pre='${m.prefix}' dsid='${m.dsId}'  sflag="m" flag='2'  right='${butp.BUT_RIGHT}'>${butp.BUTN_NAME}</a>
										</c:if>
										<c:if test="${not empty butp.SCRIPT_FUNC}">
											<a class='easyui-linkbutton' isbutn="true"  id="${m.prefix}_${butp.BUT_CODE}" iconCls="${butp.iconCls}" onclick="${butp.SCRIPT_FUNC}" code='${m.prefix}_${butp.BUT_CODE}'   pre='${m.prefix}' dsid='${m.dsId}' sflag="m" flag='2'   right='${butp.BUT_RIGHT}'>${butp.BUTN_NAME}</a>
										</c:if>
									</c:if>
								</c:forEach>
								<a class='easyui-linkbutton' iconCls="icon-back" onclick="return closePanel(this)" sflag="m" code ='rollBack'  pre='${m.prefix}' dsid='${m.dsId}' style="float: right;">返回</a>
							</div> 
						</td>
					</tr>
			    </table>
			</div>
			<div id="${m.prefix}_costPanel2"  style="overflow-x:hidden;overflow-y: visible;padding-left: 5px;" >  
				<!-- 主明细中的主单 -->
			    <div title="${m.panelTitle}" id="${m.prefix}_costPanel2_Z">  
			        	<form id='${m.prefix}_addWinForm' dsId="${m.dsId}">
				        	<div  class='tableBord' id='${m.prefix}_addWinTable' ></div>
			        	</form>
			        	<!-- 一个存放预收Id 一个存放收款Id  主要用于客户收款单中 -->
			        	<input type="hidden" id="${m.prefix}_t_ysId"/>
			        	<input type="hidden" id="${m.prefix}_t_dkId"/>
			    </div>
			    
			   <div class="caption-bar" style="margin-top:3px;">
			    	<div onclick="closeP(this)" class="collapse-button"></div>
			    	<div class="caption">明细信息</div>
			    	<!-- 用于存放明细的统计 -->
					<div  id="${m.prefix}_totalItem" style="margin-left:200px;width: 735px;line-height: 19px;background-image:url('${pageContext.request.contextPath}/model/images/bg1.png');padding-left:13px;" ></div>
			    	<div class="bar-right"></div>
			    </div>
			    
		        <!-- 主明细中的明细单据 -->
		        <div title="${m.panelTitle}明细" id="${m.prefix}_costPanel2_MX"  style="overflow-x:hidden;clear: both;;margin-left: 10px;">  
		        	<!-- 明细中的查询条件 -->
					<div id='${m.prefix}_addItemBut' style="padding: 10px;height:20px;" >
						<div id="${m.prefix}_MXInput" dsId="${m.dsId}" style="float: left;" ></div>
		            	<!-- 明细中的按钮 -->
		            	<div id="${m.prefix}_itemButns"  style="float:left;">
							<!-- 生成加载个性按钮 -->
							<c:forEach items="${m.mxButnList}" var="mxButn">
								<!-- 分组的个性化的按钮 -->
								<c:if test="${not empty mxButn.IS_GROUP && mxButn.IS_GROUP =='T' && not empty mxButn.GROUP_ID}">
									<a href="javascript:void(0)" isbutn="true" id="mb2" plain="false"  code='${m.prefix}_${mxButn.BUT_CODE}' iconCls="${mxButn.iconCls}" menu="#${mxButn.GROUP_ID}" class="easyui-menubutton" >${mxButn.BUTN_NAME}</a>
										<div id="${mxButn.GROUP_ID}" style="width: 150px;">
											<c:forEach items="${m.mxButnList}" var="mxBut">
												<c:if test="${mxBut.IS_GROUP != 'T' && not empty mxBut.GROUP_ID  && mxBut.GROUP_ID==mxButn.GROUP_ID}">
													<c:if test="${empty mxBut.SCRIPT_FUNC}">
											   			<div isbutn="true" id='${mxBut.BUT_CODE}' code='${m.prefix}_${mxBut.BUT_CODE}' iconCls="${mxBut.iconCls}" pre='${m.prefix}' dsid="${fn:split(m.dsId,';')[1]}"  tit='${m.panelTitle}' flag='1'  oflag="1" sflag="m" right='${mxBut.BUT_RIGHT}'>${mxBut.BUTN_NAME}</div>
											   		</c:if>
											   		<c:if test="${not empty mxBut.SCRIPT_FUNC}">
												   		<div isbutn="true" id='${m.prefix}_${mxBut.BUT_CODE}' onclick="${mxBut.SCRIPT_FUNC}" iconCls="${mxBut.iconCls}" code='${m.prefix}_${mxBut.BUT_CODE}'  pre='${m.prefix}' dsid="${fn:split(m.dsId,';')[1]}" tit='${m.panelTitle}' flag='1'  oflag="1" sflag="m"  right='${mxBut.BUT_RIGHT}'>${mxBut.BUTN_NAME}</div>  
											   		</c:if>
												</c:if>
											</c:forEach>
										</div>
								</c:if>
								<!-- 非分组的个性化的按钮 -->
								<c:if test="${empty mxButn.IS_GROUP && empty mxButn.GROUP_ID}">
				 					<c:if test="${empty mxButn.SCRIPT_FUNC}">
										<a  isbutn="true" class='easyui-linkbutton' iconCls="${mxButn.iconCls}"  code='${m.prefix}_${mxButn.BUT_CODE}' id='${m.prefix}_${mxButn.BUT_CODE}'  pre='${m.prefix}' dsid="${fn:split(m.dsId,';')[1]}" tit='${m.panelTitle}' sflag="m" flag='2' right='${mxButn.BUT_RIGHT}'>${mxButn.BUTN_NAME}</a>
									</c:if>
									<c:if test="${not empty mxButn.SCRIPT_FUNC}">
										<a isbutn="true" class='easyui-linkbutton' iconCls="${mxButn.iconCls}" onclick="${mxButn.SCRIPT_FUNC}"  code='${m.prefix}_${mxButn.BUT_CODE}' id='${m.prefix}_${mxButn.BUT_CODE}'  pre='${m.prefix}' dsid="${fn:split(m.dsId,';')[1]}" tit='${m.panelTitle}' sflag="m" flag='2' right='${mxButn.BUT_RIGHT}'>${mxButn.BUTN_NAME}</a>
									</c:if>
								</c:if>
							</c:forEach>
						</div>
						<div style="cursor: pointer;float:left;margin:3px 10px;display:none;" id="${m.prefix}_checkbox"><input id="ischecked" type="checkbox">单品多行</div>
					</div>
							
					<!-- 主明细中加载明细的数据列表 -->
					<div id='${m.prefix}_addItemDatagrid' realdsid="${fn:split(m.dsId,';')[1]}" dsId="${m.dsId}" prefix="${m.prefix}"  style="clear: both"></div>
					<div id='${m.prefix}_congfigValItem'  style="border:1px solid #99BBE8;font-size:14px; color: green;height: 30px;margin-top:5px;width: 99%;"></div>
		        </div>      
			</div>	
		</div>
			<input type="hidden" id="${m.prefix}_modelType" value="2"/>
			<input type="hidden" id="${m.prefix}_m_dsId" value="${m.dsId}"/>
			<input type="hidden" id="${m.prefix}_m_type" value="${m.type}"/>
			<input type="hidden" id="${m.prefix}_m_jsUrl" value="${m.jsUrl}"/>
			<input type="hidden" id="${m.prefix}_m_prefix" value="${m.prefix}"/>
			<input type="hidden" id="${m.prefix}_m_initFunc" value="${m.initFunc}"/>
			<input type="hidden" id="${m.prefix}_m_ainitFunc" value="${m.ainitFunc}"/>
			<input type="hidden" id="${m.prefix}_m_keyValue" value="${m.keyValues}"/>
	</div>
</body>
</html>